<?php
header("Content-Type: text/html; charset=utf-8");
function getSampletest()
{
    echo '11';
//    $str= shell_exec('java -cp ./test/demo.jar Contrallor.demo 111  222');
//    $encode = mb_detect_encoding($str, array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'));
//    $str= mb_convert_encoding($str, 'UTF-8', $encode);
//    var_dump($str);



    $str= shell_exec('java -cp ./test/gradleDemo2.jar com.Controller outString ');
    $encode = mb_detect_encoding($str, array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'));
    $str= mb_convert_encoding($str, 'UTF-8', $encode);
    var_dump($str);
}
getSampletest();
?>